package com.jichangxiu.server.platform.entity.po;

import com.baomidou.mybatisplus.annotation.*;
import com.jichangxiu.common.entity.po.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@TableName("platform_tenant")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@Schema(description = "租户实体")
public class PlatformTenant extends BaseEntity implements Serializable {

    @Schema(description = "租户ID")
    @TableId(value = "tenant_id", type = IdType.ASSIGN_UUID)
    private String tenantId;

    @TableField("tenant_no")
    @Schema(description = "租户编码")
    private String tenantNo;

    @TableField("tenant_code")
    @Schema(description = "租户标识")
    private String tenantCode;

    @TableField("tenant_name")
    @Schema(description = "租户名称")
    private String tenantName;

    @TableField("platform_user_id")
    @Schema(description = "租户负责人ID")
    private String platformUserId;

    @TableField(exist = false)
    @Schema(description = "租户负责人名称")
    private String platformUserName;

    @TableField("phone")
    @Schema(description = "租户联系电话")
    private String phone;

    @TableField("email")
    @Schema(description = "租户邮箱")
    private String email;

    @TableField("logo_url")
    @Schema(description = "租户Logo")
    private String logoUrl;

    @TableField("start_date")
    @Schema(description = "租户系统开始时间")
    private Date startDate;

    @TableField("end_date")
    @Schema(description = "租户系统到期时间")
    private Date endDate;

    @TableField("is_platform")
    @Schema(description = "是否平台级租户（0否 1是）")
    private Boolean isPlatform;

    @TableField("remark")
    @Schema(description = "备注")
    private String remark;

    @TableField("status")
    @Schema(description = "状态（false停用 true正常）")
    private Boolean status;

    @TableLogic
    @TableField("deleted")
    @Schema(description = "是否删除（0否 1是）")
    private String deleted;

}
